<?php

	namespace process;

	#define('process\path', 			realpath('.'));
	define('process\path', 			__DIR__);
	define('process\core', 			path . DIRECTORY_SEPARATOR . 'core' . 	DIRECTORY_SEPARATOR);
	define('process\config', 		path . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR);
	define('process\controller',	path . DIRECTORY_SEPARATOR . 'app' . 	DIRECTORY_SEPARATOR . 'controllers' . 	DIRECTORY_SEPARATOR);
	define('process\model', 		path . DIRECTORY_SEPARATOR . 'app' . 	DIRECTORY_SEPARATOR . 'models' . 		DIRECTORY_SEPARATOR);
	define('process\view', 			path . DIRECTORY_SEPARATOR . 'app' . 	DIRECTORY_SEPARATOR . 'views' . 		DIRECTORY_SEPARATOR);
	
	spl_autoload_extensions('.php');
	spl_autoload_register();
	
	\core\process::core('router',
		array(
			'default' 	=> 'index',
			'abc'		=> 'teste/abc/args',
		)
	);
	
	/*
	spl_autoload_register(function($class_path){
		#include_once process_core . 'process' . '.php';
		#include_once process_core . 'router' . '.php';
		\process\process_debug($class_path);
		
	});
	*/
	
	function process_debug($array = array())
	{
		echo '<pre>';
		print_r($array);
		echo '</pre>';
	}
	
	/*
	if (class_exists('db'))
	{
		process::core('db')->close();
	}
	*/
	
	